import { COLUMNS_WIDTH } from '@/utils/common'
import { formatTime } from '@/utils/format'

export const COLUMNS = [
    {
        title: '#',
        dataIndex: 'id',
        key: 'id',
        fixed: 'left',
        width: COLUMNS_WIDTH.id
    },
    {
        title: '县名字',
        dataIndex: 'countyName',
        width: COLUMNS_WIDTH.wd1,
        key: 'countyName'
    },
    {
        title: '总销量(万)',
        dataIndex: 'totalSales',
        width: COLUMNS_WIDTH.wd1,
        key: 'totalSales'
    },
    {
        title: '县销量榜第一',
        dataIndex: 'countySaleFirst',
        key: 'countySaleFirst'
    },
    {
        title: '榜首销量(万)',
        dataIndex: 'firstSales',
        width: COLUMNS_WIDTH.wd1,
        key: 'firstSales'
    },
    {
        title: '县网店量(家)',
        dataIndex: 'OnlineStore',
        width: COLUMNS_WIDTH.wd1,
        key: 'OnlineStore'
    },
    {
        title: '县实体店量(家)',
        dataIndex: 'offlineStore',
        key: 'offlineStore'
    },
    {
        title: '创建时间',
        dataIndex: 'createdTime',
        key: 'createdTime',
        width: COLUMNS_WIDTH.wdDate,
        customRender: (value: any) => {
            return formatTime(value.text, 'YYYY-MM-DD HH:mm:ss')
        }
    },
    {
        title: '更新时间',
        dataIndex: 'updatedTime',
        key: 'updatedTime',
        width: COLUMNS_WIDTH.wdDate,
        customRender: (value: any) => {
            return formatTime(value.text, 'YYYY-MM-DD HH:mm:ss')
        }
    },
    {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
        width: COLUMNS_WIDTH.wdBtn,
        fixed: 'right'
    }
]
